package com.jf3q.security.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author ASUS
 * @date 2024/4/13
 * @apiNote
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AjaxResultVO {
    private Integer code;
    private String msg;
    private Object data;

    public static AjaxResultVO success(){
        return new AjaxResultVO(200,null,null);
    }
    public static AjaxResultVO success(Object data){
        return new AjaxResultVO(200,null,data);
    }
    public static AjaxResultVO success(String msg,Object data){
        return new AjaxResultVO(200,msg,data);
    }
    public static AjaxResultVO error(){
        return new AjaxResultVO(500,null,null);
    }
    public static AjaxResultVO error(String msg){
        return new AjaxResultVO(500,msg,null);
    }
    public static AjaxResultVO error(Integer code,String msg){
        return new AjaxResultVO(code,msg,null);
    }
}
